#ifndef RESOURCESMANAGER_H
#define RESOURCESMANAGER_H

#include "d3dUtil.h"
#include "StringUtil.h"

class ResourcesManager
{
public:
	~ResourcesManager(void);

	static void Init(ID3D10Device* device);

	static ResourcesManager* Instance();

	//get the texture by name
	ID3D10ShaderResourceView* GetTexture(const std::string& texName);

	//clear all the resource
	void Clear();

private:

	ID3D10ShaderResourceView* CreateTexture(const std::string& texName);

	//singleton stuff
	void SetDevice(ID3D10Device* device);
	ResourcesManager(void);
	ResourcesManager(const ResourcesManager&);
	ResourcesManager& operator=(const ResourcesManager&);

private:
	ID3D10Device*										m_Device;
	std::map<std::string,ID3D10ShaderResourceView*>		m_TextureMap;
};



#endif

